

<script type='text/javascript'>
	function _delete(){
		if(confirm('really?')) {
			app.post('/services/invoices/delete/{{invoice.number}}', {}, function(result){
				if(result == 'ok')	{
					app.load('/services/invoices');
				}
				else{
					alert(result);
				}
			});
		}
	}
</script>

<div id='menu'>
	<ul>
		<li><a href='javascript:app.load("/services/invoices")'>go back</a></li>
	</ul>
</div>

<div id='content'>
	
	<h1>delete invoice</h1>

	<table class='summary-table'>
		<tr><td class='left'>number</td><td>{{invoice.number}}</td></tr>
		<tr><td class='left'>created</td><td>{{invoice.created|date:"D d M Y" }}</td></tr>
		<tr><td class='left'>start date</td><td>{{invoice.startDate|date:"D d M Y" }}</td></tr>
		<tr><td class='left'>end date</td><td>{{invoice.endDate|date:"D d M Y" }}</td></tr>
		<tr><td class='left'>comments</td><td>{{invoice.comments}}</td></tr>
		<tr><td class='left'>hours</td><td>{{invoice.hours}}</td></tr>
		<tr><td class='left'>rate</td><td>{{invoice.rate}}</td></tr>
		<tr><td class='left'>taxRate</td><td>{{invoice.taxRate}}</td></tr>
		<tr><td class='left'>paid</td><td>{{invoice.paid}}</td></tr>
		<tr><td class='left'>sent</td><td>{{invoice.sent}}</td></tr>
		<tr><td></td><td><a href='javascript:_delete()'>delete</a></td>
	</table>
	
	
	
</div>